#include <iostream>
#include <ratio>
#include <optional>
#include "VanEmdeBoasTree.h"

using namespace std;

int main()
{
	size_t arr[] = { 2, 3, 4, 5, 7, 14, 15 };
	VanEmdeBoasTree<2> m;
	for (auto i : arr)
		m.insert(i);
	
	bool first = true;
	for (auto i = m.min(); i; i = m.successor(*i))
	{
		if (first) first = false;
		else cout << ",";
	
		cout << *i;
	}
	cout << endl;

	m.erase(4);
	first = true;
	for (auto i = m.min(); i; i = m.successor(*i))
	{
		if (first) first = false;
		else cout << ",";

		cout << *i;
	}

	return 0;
}